package org.cfx.gift.client.fallback;

import feign.hystrix.FallbackFactory;
import org.cfx.gift.client.UserClient;
import org.cfx.gift.domain.User;
import org.cfx.gift.domain.UserInfo;
import org.cfx.gift.util.AjaxResult;
import org.springframework.stereotype.Component;

/**
 * @author RTX 9090
 */
@Component
public class UserClientFallBack implements UserClient {

    @Override
    public AjaxResult addOrUpdate(User user) {
        return new AjaxResult().setMessage("服务已熔断！").setSuccess(false);
    }
    @Override
    public AjaxResult addOrUpdate(UserInfo userInfo) {
        return new AjaxResult().setMessage("服务已熔断！").setSuccess(false);
    }
    @Override
    public AjaxResult getById(Long id) {
        return new AjaxResult().setMessage("服务已熔断！").setSuccess(false);
    }

    @Override
    public AjaxResult getByLoginId(Long loginId) {
        return new AjaxResult().setMessage("服务已熔断！").setSuccess(false);
    }
}
